package com.peanut.service.Impl;

import com.peanut.dao.CommonDao;
import com.peanut.dao.NavDao;
import com.peanut.dao.OnlineDao;
import com.peanut.model.OnlineModel;
import com.peanut.service.OnlineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class OnlineServiceImpl implements OnlineService {
    @Autowired
    private CommonDao commonDao;
    @Autowired
    private NavDao navDao;
    @Autowired
    private OnlineDao onlineDao;


    @Override
    public Map<String, Object> getOnline() {
        Map<String, Object> map = new HashMap<>();
        map.put("common", commonDao.getCommonDate());
        map.put("nav", navDao.getNavList());
        map.put("mNav", navDao.getMNavList());
        map.put("online", onlineDao.getOnline());
        return map;
    }
}
